Resource URL: /platform/<<version=1>>/snapshot/snapshots/<SID>

    Overview: This resource applies the standard collection item pattern to
              individual OneFS snapshots.  SID in the resource path is either
              the snapshot name (preferred) or snapshot ID.

     Methods: GET, PUT, DELETE

********************************************************************************

Method GET: Retrieve snapshot information.

       URL: GET /platform/<<version=1>>/snapshot/snapshots/<SID>

There are no query arguments for this method.

GET response body schema:
{
  "type": "object", 
  "properties": {
    "snapshots": {
      "items": {
        "type": "object", 
        "properties": {
          "pct_reserve": {
            "required": true, 
            "type": "number", 
            "description": "Percentage of configured snapshot reserved used for storing this snapshot."
          }, 
          "shadow_bytes": {
            "required": true, 
            "type": "integer", 
            "description": "The amount of shadow bytes referred to by this snapshot."
          }, 
          "name": {
            "required": true, 
            "type": [
              "string", 
              "null"
            ], 
            "description": "The user or system supplied snapshot name. This will be null for snapshots pending delete."
          }, 
          "created": {
            "required": true, 
            "type": "integer", 
            "description": "The Unix Epoch time the snapshot was created."
          }, 
          "target_name": {
            "required": true, 
            "type": [
              "string", 
              "null"
            ], 
            "description": "The name of the snapshot pointed to if this is an alias."
          }, 
          "expires": {
            "required": true, 
            "type": [
              "integer", 
              "null"
            ], 
            "description": "The Unix Epoch time the snapshot will expire and be eligible for automatic deletion."
          }, 
          "target_id": {
            "required": true, 
            "type": [
              "integer", 
              "null"
            ], 
            "description": "The ID of the snapshot pointed to if this is an alias."
          }, 
          "schedule": {
            "required": true, 
            "type": [
              "string", 
              "null"
            ], 
            "description": "The name of the schedule used to create this snapshot, if applicable."
          }, 
          "alias": {
            "required": true, 
            "type": [
              "string", 
              "null"
            ], 
            "description": "Alias name to create for this snapshot. If null, remove any alias."
          }, 
          "state": {
            "enum": [
              "active", 
              "deleting"
            ], 
            "type": "string", 
            "description": "Snapshot state.", 
            "required": true
          }, 
          "has_locks": {
            "required": true, 
            "type": "boolean", 
            "description": "True if the snapshot has one or more locks present see, see the locks subresource of a snapshot for a list of locks."
          }, 
          "path": {
            "required": true, 
            "type": [
              "string", 
              "null"
            ], 
            "description": "The /ifs path snapshotted."
          }, 
          "pct_filesystem": {
            "required": true, 
            "type": "number", 
            "description": "Percentage of /ifs used for storing this snapshot."
          }, 
          "id": {
            "required": true, 
            "type": "integer", 
            "description": "The system ID given to the snapshot. This is useful for tracking the status of delete pending snapshots."
          }, 
          "size": {
            "required": true, 
            "type": "integer", 
            "description": "The amount of storage in bytes used to store this snapshot."
          }
        }
      }, 
      "type": "array"
    }
  }
}

********************************************************************************

Method PUT: Modify snapshot. All input fields are optional, but one or more
            must be supplied.

       URL: PUT /platform/<<version=1>>/snapshot/snapshots/<SID>

There are no query arguments for this method.

PUT request body schema:
{
  "type": "object", 
  "properties": {
    "alias": {
      "type": [
        "string", 
        "null"
      ], 
      "description": "Alias name to create for this snapshot. If null, remove any alias."
    }, 
    "expires": {
      "type": [
        "integer", 
        "null"
      ], 
      "description": "The Unix Epoch time the snapshot will expire and be eligible for automatic deletion."
    }, 
    "name": {
      "type": [
        "string", 
        "null"
      ], 
      "description": "The user or system supplied snapshot name. This will be null for snapshots pending delete."
    }
  }
}

There is no response body for this method.

********************************************************************************

Method DELETE: Delete the snapshot. Deleted snapshots will be placed into a
               deleting state until the system can reclaim the space used by
               the snapshot.

          URL: DELETE /platform/<<version=1>>/snapshot/snapshots/<SID>

There are no query arguments for this method.

There is no response body for this method.
